#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    int n=0,result=0;
    double aim=0;
    vector<double> vec;
    vector<double>::iterator iter;
    double temp=0;
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cin>>temp;
        vec.push_back(temp);
    }
    cin>>aim;
    iter=find(vec.begin(),vec.end(),aim);
    result=iter==vec.end()?(-1):(iter-vec.begin());
    cout<<result<<endl;
    return 0;
}
